/**
 * Description:
 * Class Name:QuestionMarkInGeneric
 * Date:2022/3/24 14:24
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第9章_泛型._9_3_类型通配符._9_3_1_使用类型通配符;

import java.util.ArrayList;
import java.util.List;

public class QuestionMarkInGeneric {
    public void test(List<?> c){
        for (int i = 0; i < c.size(); i++) {
            System.out.println(c.get(i));
            System.out.println(c.get(i).getClass());
        }
    }

    public static void main(String[] args) {
        List<String> ll = new ArrayList<>();
        ll.add("hi");
        new QuestionMarkInGeneric().test(ll);
    }
}
